import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86156
 * Date: 2023-04-09
 * Time: 9:15
 */

// 金额转换
public class money {
    public static void main(String[] args) {
        // 输入金额
        Scanner scanner = new Scanner(System.in);
        int money = scanner.nextInt();

        //转换成大写形式
        char [] arr = {'零','壹','贰','叁','肆','伍','陆','柒','捌','玖'};
        int count = 0;
        String result = "";
        while(true){

            int ge = money%10;
            money/=10;

            char ch = arr[ge];
            result = ch+result;

            count++;

            if(money==0){
                break;
            }
        }

        // 补零
        for (int i = 0; i < 7-count; i++) {
            result = "零"+result;
        }

        // 插入
        String str = "";
        char [] chars = {'佰','拾','万','千','佰','拾','元'};
        for (int i = 0; i < result.length(); i++) {
            str = str +result.charAt(i) + chars[i];
        }
        System.out.println(str);
    }
}
